<script>
    var a = 0.1;
    var b = 0.2;

    console.log((a*10+b*10)/10);  

</script>